import logging

# 默认的日志输出级别为warning
# 使用baseconfig()来指定日志输出级别
# a是追加，w是覆盖
#logging.basicConfig(filename='demo.log',filemode='a',level=logging.DEBUG)
logging.debug("This is debug log")
logging.info("This is info log")
logging.warning("This is warning log")
logging.error("This is error log")
logging.critical("This is critical log")